{extend name="default/template/base_index" /}

{block name="area_header"}
    <style type="text/css">
        img{
            height:20px;
            width:20px;
        }
    </style>
{/block}

{block name="area_body"}
    {include file="default/Widget/topbar" /}
    <div class="admin-main container-fluid">
        {include file="default/Widget/left" /}
        <div class="admin-main-content">
            {include file="default/Widget/breadcrumb" /}
            <table class="table table-striped table table-hover  table-condensed">
                <thead>
                <tr>
                    <th>
                        <input type="checkbox" class="selectall" onclick="myUtils.selectall(this,'.selectitem');" />PID
                    </th>
                    <th>
                        商品名称
                    </th>
                    <th>
                        商品规格信息
                    </th>
                    <th>
                        商品库存
                    </th>
                    <th>
                        管理
                    </th>
                </tr>
                </thead>
                <tbody>
                {empty name="list"}
                    <tr>
                        <td colspan="6" class="text-center">{:L('NO_DATA')}</td>
                    </tr>
                    {else/}
                    {volist name="list" id="vo"}
                        <tr>
                            <td>
                                {$vo.id}
                            </td>
                            <td>
                                {$vo.name}
                            </td>
                            <td>
                                {volist name="vo.sku_all" id="v"}
                                    {$v.id.id_name}:{$v.vid.vid_name}<br/>
                                {/volist}
                            </td>
                            <td>
                                {$vo.quantity}
                            </td>
                            <td>
                                <a class="btn btn-primary btn-sm" href="{:url('Quantity/add',array('pid'=>$vo['id'],'sku'=>$vo['sku']))}">管理</a>
                            </td>
                        </tr>
                    {/volist}
                {/empty}
                </tbody>
            </table>
            <div>{$show}</div>
        </div>
        <!-- END admin-main-content -->
    </div>
    <!-- END admin-main-->
{/block}

{block name="area_footer"}
    <script type="text/javascript">
        $(function(){

        });
    </script>
{/block}
